<template>
  <div class="mfunction">
    <div class="item" v-for="(i, index) in item" :key="index" @click="onClick(index)">
      <div class="imgbox">
        <img :src="i.icon" alt="" />
      </div>
      <span>{{ i.title }}</span>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import { Toast } from "vant";
Vue.use(Toast);
export default {
  props: {
    item: Array,
  },
  methods:{
    onClick(index){
        if(index<2){
          this.$router.push({path:'/creatorins',query:{id:index}})
        }
      }
  }
};
</script>

<style lang="less" scoped>
.mfunction {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-evenly;
  margin: 40px 0 28px 0;
  .item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .imgbox {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 15px;
      box-shadow: 1px 1px 10px 5px #efefef;
      img {
        width: 25px;
        height: 25px;
      }
    }

    span {
      font-size: 14px;
      color: #000;
    }
  }
}
</style>